<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<script src="../../scripts/ace-class.js"></script>
	<title>ace class examples</title>
	<style>
#editor{
	width: 600px;
	height: 600px;
}
	</style>
</head>
<body>
	<textarea id="editor"></textarea>
	<script>
void function(){
	function Cat(){}
	Cat.prototype.log = function(text){
		console.log(text);
	};
	Cat.prototype.show = function(){
		this.log('Cat.prototype.show');
	};
	
	function RedCat(){}
	RedCat.prototype.show = function(){
		this.base();
		this.log('RedCat.prototype.show');
	};
	
	function BigRedCat(editor){
		this.editor = editor;
	}
	BigRedCat.prototype.log = function(text){
		if (this.editor){
			this.editor.value += text + '\n';
		} else {
			this.base(text);
		}
	};
	BigRedCat.prototype.show = function(){
		this.base();
		this.log('BigRedCat.prototype.show');
	};
	
	AceClass.tree([
		Cat, [
			RedCat, [
				BigRedCat
			]
		]
	]);
	var cat = new BigRedCat(document.getElementById('editor'));
	cat.show();
}();
	</script>
</body>
</html>